﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Ry.ReadChinese;
using SpeechLib;

namespace test
{

    public partial class Form1 : Form
    {
        private SpeakVoice sv;
        paramObj b = new paramObj();
        public Form1()
        {
            sv =  new SpeakVoice();
            
            sv.BeginSpeak +=new RyReadEvent(BeginSpeak);
            sv.EndSpeak = this.EndSpeak;
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            sv.AppendSpeak(textBox1.Text, textBox1.Text + "abc");
            sv.speakVoice();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            sv.Show();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }


        private void BeginSpeak(string sender, object e)
        {
      
            listBox1.Items.Add("Begin+"+e);
        }

        private void EndSpeak(string sender, object e)
        {
            listBox1.Items.Add("End+" + e);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Ry.Database.DBInterface db = new Ry.Database.CRyORACLE();
            db.ConnectDB("172.16.115.155", 1521, "us", "US", "oracle", true);
        }

        private void button2_Click_1(object sender, EventArgs e)
        {

        }
    }

}
